﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Main
{
    class Action
    {
        List<Act> Actions = new List<Act>();

        public Act getAction(string name)
        {
            Act result = null;
            foreach (Act a in Actions)
            {
                if (a.Name == name)
                {
                    result = a;
                    break;
                }
            }
            return result;
        }

        public bool doAction(string name, string user, string target)
        {

        }

        public bool registerAction(string name, Act action)
        {
            Act result = null;
            foreach (Act a in Actions)
            {
                if (a.Name == name)
                {
                    result = a;
                    break;
                }
            }
            if (result == null)
            {
                Actions.Add(action);
                return true;
            }
            else
            {
                return false;
            }
        }
    }

    class Act
    {
        public Act(string Name)
        {
            this.Name = Name;
        }

        public string Name
        {
            get { return Name; }
            set { Name = value; }
        }
    }
}
